package com.cloud.message.support;

import com.cloud.common.bean.Message;
import com.cloud.common.bean.ResultInfo;
import com.cloud.common.feign.FeignInvoke;
import com.cloud.common.sentinel.Sentinel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface ServiceProvider {

    @FeignInvoke(rpc = true)
    @PostMapping("/message/handle")
    ResultInfo<String> handle(@RequestBody Message message);

    @Sentinel
    @FeignClient(name = "cloud-sample", qualifier = "cloud-sample")
    interface DemoProvider extends ServiceProvider {}
}
